{include file="common/forum_head"}

<style type="text/css">

  #content img{
    cursor: pointer;
    transition: all 0.6s;
  }
  #content img:hover{
    transform: scale(1.4);
  }
</style>

<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md8 content detail">
      <div class="fly-panel detail-box">
        <h1>{$note_info.title}</h1>
        <div class="fly-detail-info">
          <!-- <span class="layui-badge">审核中</span> -->
          <span class="layui-badge layui-bg-green fly-detail-column">22{$note_info.name}</span>

          {if($note_info['is_end'] == 0)}
          <span class="layui-badge" style="background-color: #999;">未结</span>
          {else}
          <span class="layui-badge" style="background-color: #5FB878;">已结</span>
          {/if}
          {if($note_info['is_top'] == 1)}
          <span class="layui-badge layui-bg-black">置顶</span>
          {/if}
          {if($note_info['is_good'] == 1)}
          <span class="layui-badge layui-bg-red">精帖</span>
          {/if}

          <div class="fly-admin-box" data-id="{$note_info['id']}">
            {if CID && (CID==$note_info['center_id'] || $center_info['is_admin']==1)}
              <span class="layui-btn layui-btn-xs jie-admin" type="del">删除</span>
              {if($note_info['is_top'] == 0)}
              <span class="layui-btn layui-btn-xs jie-admin" type="set" field="stick" rank="1">置顶</span>
              {else}
              <span class="layui-btn layui-btn-xs jie-admin" type="set" field="stick" rank="0" style="background-color:#ccc;">取消置顶</span>
              {/if}
              {if($note_info['is_good'] == 0)}
              <span class="layui-btn layui-btn-xs jie-admin" type="set" field="status" rank="1">加精</span>
              {else}
            <span class="layui-btn layui-btn-xs jie-admin" type="set" field="status" rank="0" style="background-color:#ccc;">取消加精</span>
              {/if}
            {/if}
          </div>
          <span class="fly-list-nums"> 
            <a href="#comment"><i class="iconfont icon-pinglun2" title="回答"></i> <span id="jiedaCount">{$note_info.comment_num}</span></a>
            <!--<i class="iconfont" title="人气">&#xe60b;</i> 99999-->
          </span>
        </div>
        <div class="detail-about">
          <a class="fly-avatar" href="{:url('/index/center/home')}?id={$note_info.center_id}">
            <img src="{$note_info.thumb}" alt="{$note_info.username}">
          </a>
          <div class="fly-detail-user">
            <a href="{:url('/index/center/home')}?id={$note_info.center_id}" class="fly-link">
              <cite>{$note_info.username}</cite>
              <i class="iconfont icon-renzheng" title="认证信息：{{ rows.user.approve }}"></i>
              <i class="layui-badge fly-badge-vip">VIP3</i>
            </a>
            <span>{$note_info.update_time}</span>
          </div>
          <div class="detail-hits" id="LAY_jieAdmin" data-id="{$note_info['id']}">
            <span style="padding-right: 10px; color: #FF7200">悬赏：{$note_info.credit}</span>
            {if( CID && (CID==$note_info['center_id'] || $center_info['is_admin']==1))}
            <span class="layui-btn layui-btn-xs jie-admin" type="edit"><a href="{:url('/index/forum/editnote')}?id={$note_info.id}">编辑此贴</a></span>
            {/if}

          </div>
        </div>
        <div class="detail-body photos"   id="content">
          {$note_info.content}
        </div>
      </div>

      <div class="fly-panel detail-box" id="flyReply">
        <fieldset class="layui-elem-field layui-field-title" style="text-align: center;">
          <legend>回帖</legend>
        </fieldset>

        <ul class="jieda" id="jieda">
          {if(!empty($commentList))}
          {foreach $commentList as $k=>$v}
          <li data-id="{$v.id}" data-note="{$note_info.id}" class="jieda-daan">
            <a name="item-1111111111"></a>

            <div class="detail-about detail-about-reply">
              <a class="fly-avatar" href="">
                <img src="{$v.thumb}" alt=" {$v.username}">
              </a>
              <div class="fly-detail-user">
                <a href="" class="fly-link">
                  <cite>{$v.username}</cite>
                  <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>
                  <i class="layui-badge fly-badge-vip">VIP3</i>              
                </a>
                {if(CID==$v['center_id'] )}
                <span>(楼主)</span>
                {/if}
                {if($note_info['disabled']==0)}
                <span style="color:#5FB878">(管理员)</span>
                <span style="color:#FF9E3F">（社区之光）</span>
                <span style="color:#999">（该号已被封）</span>
                {/if}
              </div>

              <div class="detail-hits">
                <span>{$v.update_time}</span>
              </div>
              {if($v['is_accept']==1)}
              <i class="iconfont icon-caina" title="最佳答案"></i>
              {/if}
            </div>

            <div class="detail-body jieda-body photos">
             {$v.content}
            </div>
            <div class="jieda-reply ">
              {if CID}
              <span class=" jieda-zan {if in_array($v['id'],$zanArr)} zanok {/if}" type="zan">
                <i class="iconfont icon-zan"></i><em>{if(array_key_exists($v['id'],$zanNum))}{$zanNum[$v['id']]}{else}0{/if}</em>
              </span>
              <span type="reply">
                <i class="iconfont icon-svgmoban53"></i> 回复
              </span>
              {else}
              <a class="checkCenter" style="padding-right: 20px;color: #999;cursor: pointer;">
                <i class="iconfont icon-zan"></i><em>{if(array_key_exists($v['id'],$zanNum))}{$zanNum[$v['id']]}{else}0{/if}</em>
              </a>
              <a  class="checkCenter" style="padding-right: 20px;color: #999;cursor: pointer;">
                <i class="iconfont icon-svgmoban53"></i> 回复
              </a>
              {/if}
              <div class="jieda-admin">
                {if (CID==$v['center_id']) }
                <span type="edit">编辑</span>
                <span type="del">删除</span>
                {/if}
                {if(CID && (CID==$note_info['center_id'] ))}
                <span class="jieda-accept" type="accept">采纳</span>
                {/if}
              </div>
            </div>
          </li>
          {/foreach}
          {else}
          
          <!-- 无数据时 -->
          <li class="fly-none">消灭零回复</li>
          {/if}



        </ul>
        
        <div class="layui-form layui-form-pane">
          <form action="/index/forum/reply/" method="post">
            <!--<form action="/jie/reply/" method="post">-->
            <div class="layui-form-item layui-form-text">
              <a name="comment"></a>
              <div class="layui-input-block">
                <textarea id="L_content" name="content" required lay-verify="required" placeholder="请输入内容"  class="layui-textarea fly-editor" style="height: 150px;"></textarea>
              </div>
            </div>
            <div class="layui-form-item">
              <!--<input type="hidden" name="jid" value="123">-->
              <input type="hidden" name="note_id" value="{$note_info['id']}" id="note_id">
              <input type="hidden" name="parent_comment_id" value="0" id="parent_comment_id">
              <button class="layui-btn" lay-filter="*" lay-submit>提交回复</button>
            </div>
          </form>
        </div>
      </div>
    </div>
    <div class="layui-col-md4">
      <dl class="fly-panel fly-list-one" id="LAY_noteRank">
        <!--<dt class="fly-panel-title">本周热议</dt>-->
        <!--<dd>-->
          <!--<a href="">基于 layui 的极简社区页面模版</a>-->
          <!--<span><i class="iconfont icon-pinglun1"></i> 16</span>-->
        <!--</dd>-->
        <!--<dd>-->
          <!--<a href="">基于 layui 的极简社区页面模版</a>-->
          <!--<span><i class="iconfont icon-pinglun1"></i> 16</span>-->
        <!--</dd>-->
        <!--<dd>-->
          <!--<a href="">基于 layui 的极简社区页面模版</a>-->
          <!--<span><i class="iconfont icon-pinglun1"></i> 16</span>-->
        <!--</dd>-->


        <!-- 无数据时 -->
        <!--
        <div class="fly-none">没有相关数据</div>
        -->
      </dl>

      <div class="fly-panel">
        <div class="fly-panel-title">
          广告区域
        </div>
        <div class="fly-panel-main">
          <a href="http://www.webplatform.com/index/forum/index.html#" target="_blank" class="fly-zanzhu" time-limit="2017.09.25-2099.01.01" style="background-color: #5FB878;">
            广告位置 请加QQ群933613329
          </a>
        </div>
      </div>

      <div class="fly-panel" style="padding: 20px 0; text-align: center;">
        <!--<img src="" style="max-width: 100%;" alt="layui">-->
        <p style="position: relative; color: #666;">微信公众号开发中 请加QQ群933613329</p>
      </div>

    </div>
  </div>
</div>


<script>
layui.cache.page = 'jie';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '__IMG__/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "3.0.0"
  ,base: '__MODS__/'
}).extend({
  fly: 'index'
}).use(['fly', 'face'], function(){
  var $ = layui.$
  ,fly = layui.fly;

  //如果你是采用模版自带的编辑器，你需要开启以下语句来解析。

  $('.detail-body').each(function(){
    var othis = $(this), html = othis.html();
    othis.html(fly.content(html));
  });


    // layui.jie();

});


</script>

{include file="common/forum_foot"}